@ECHO OFF

IF EXIST C:\HomeUX.TouchScreen GOTO Skip1
MKDIR C:\HomeUX.TouchScreen 2> nul
IF NOT EXIST C:\HomeUX.TouchScreen GOTO Error
:Skip1

COPY /Y %~dp0HomeUX.TouchScreen.exe C:\HomeUX.TouchScreen
IF ERRORLEVEL 1 GOTO Error

IF NOT EXIST C:\HomeUX.TouchScreen\HomeUX.TouchScreen.exe.config COPY /Y %~dp0HomeUX.TouchScreen.exe.config C:\HomeUX.TouchScreen\HomeUX.TouchScreen.exe.config
IF ERRORLEVEL 1 GOTO Error

ECHO --
ECHO -- Finished setup to C:\HomeUX.TouchScreen
ECHO --
PAUSE
EXIT /B 0

:Error
ECHO --
ECHO -- Setup failed!
ECHO --
PAUSE
EXIT /B 1

